﻿<%@ Page Language="C#" MasterPageFile="~/cn/others.master" AutoEventWireup="true" CodeFile="news.aspx.cs" Inherits="cn_news" Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server">
    <asp:Image ID="Image1" runat="server" ImageUrl="~/image/news.jpg" Width="960px" Height="273px"/>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Label ID="Label1" runat="server" Text="公司新闻"></asp:Label>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="ObjectDataSource1">
           <HeaderTemplate>
                <table class="newsBox">
           </HeaderTemplate>
           <ItemTemplate>
              <tr>
                <td>
                <%#DataBinder.Eval(Container.DataItem,"newsContent_cn")+"["+DataBinder.Eval(Container.DataItem,"newsDate").ToString().Substring(0,DataBinder.Eval(Container.DataItem,"newsDate").ToString().IndexOf(" "))+"]" %>
               </td>
              </tr>
           </ItemTemplate>
           <FooterTemplate>
             </table>
           </FooterTemplate>
         </asp:Repeater>
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
          SelectMethod="getAllNews" TypeName="DB"></asp:ObjectDataSource>
</asp:Content>

